package com.gunncs.actoriface;
import com.gunncs.actoriface.*;
import java.awt.*;
import javax.swing.*;
import java.net.URL;
import java.io.PrintWriter;

/**
 * This class exists only as an application wrapper on all of the actors
 * listed here.  Add your actor to the list to show it in the gui.
 */
public class Actors {
  static String PREFIX = "http://gunncs.org/source/PTeam/src/";
  public static void main(String[] args) throws Exception {
    JFrame home=new JFrame("Simulator");
    Simulator sim = new Simulator();
    Simulator.out = (new PrintWriter(System.out, true));

    DecisionActor2 thing =new DecisionActor2();
    sim.addActor(thing);
    sim.addActor(new SimpleNavigator());
    String maze = thing.getMaze();
    sim.setEnvironment(EnvironmentFactory.loadConfiguration(
        new URL(PREFIX + maze +".maze")));
    sim.robot = RobotFactory.getDefaultConfiguration(sim.env);
   
    home.getContentPane().add(sim);
    home.setLocation(200, 200);
    home.setSize(1000, 300);
    home.setVisible(true);
    home.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    sim.mainLoop();
  
  }
}